<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta http-equiv="Expires" CONTENT="-1">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
<link rel="stylesheet" href="{:C('VSHOP_CSS')}index.css"/>
<link rel="stylesheet" href="{:C('VSHOP_CSS')}person.css"/>
<script src="{:C('VSHOP_JS')}jquery-1.9.1.min.js"></script>
<script src="{:C('VSHOP_JS')}jquery.js"></script>
<script src="{:C(VSHOP_JS)}public.js"></script>

</head>
<body>
<header>
  <div class="head"><a href="#" class="head-return"></a>
    <h2 class="head-title">我的订单</h2>
  </div>
</header>
<div class="my-tab-title">
  <ul>
    <a  href="{:U('Order/index')}" >我的订单</li>
    <a  href="{:U('Order/payment')}" >已付款</li>
    <a  href="{:U('Order/unpay')}" >待付款</li>
  </ul>
</div>
<div class="my-tab-box" id='all' >

  <!--全部订单start-->
  <ul>
 <!--全部未付款订单start-->

 <div class="cart-pro-box">
   <foreach name="unpay" item="un">
     <dl>
       <main>
         <dd><span class="left-pic"><img src="{:C('SITENAME')}{$un['img']}"></span><span class="right-info">
           <p class="f14">{$un.itemname}...</p>
           <p><strong class="red f14">￥{$un.order_amount}</strong></p>
           <p class="orange">待付款</p>
           </span>
           <div class="price">
             <p>x{$un.number}</p>
           </div>
         </dd>
         <div class="blank15"></div>
         <a href="javascript:void(0);" class="btn-small-red right ml-20" value="{$un.orderid}">去付款</a>
         <a href="javascript:void(0);" class="btn-small-gray right" onclick="$.order.cut({$un.orderid});">取消订单</a></main>
     </dl>
     </foreach>
   </div>

  
   <!--全部未付款订单end-->
   <!--全部付款订单start-->
   <div class="blank10"></div>
  
   <div class="blank10"></div>
   <div class="cart-pro-box" >
   <foreach name="payment" item="pay">
     <dl>
       <main>
         <dd><span class="left-pic"><img src="{:C('SITENAME')}{$pay['img']}"></span><span class="right-info">
           <p class="f14">{$pay.itemname}...</p>
           <p><strong class="red f14">￥{$pay.order_amout}</strong></p>
           <p class="gray">交易已完成</p>
           </span>
           <div class="price">
             <p>x{$pay.number}</p>
           </div>
         </dd>
         <div class="blank15"></div>
         </main>
     </dl>
     </foreach>
   </div>
   <!--全部付款订单end-->
 </ul> 
  <!--全都订单end-->
</div>
<div style="width:80%; margin:0 auto;">
  <a href="{:U('Order/index',array('page'=>$pagearr['prevpage']))}"   class="btn-more" style="width:40%;float:left" >上一页</a>
  <a href="{:U('Order/index',array('page'=>$pagearr['nextpage']))}"   class="btn-more" style="width:40%;float:right" >下一页</a>
  </div>
   
   
<div class="blank10"></div>
<script type="text/javascript">
  ////取消订单
  $(function(){
    $.order={
      cut:function(){
      var orderid=arguments[0];//购物车ID
      var res=confirm("确定要取消该订单吗");
      if(res==false)
      {
        return false;
      }
       jQuery.get('{:U("Order/cancel")}',
              {id:orderid,},
              function(data){
                if(data==1)
                {
                alert("订单取消成功");
                   location.reload();

                }

              },'text')///修改数据库end
     

      }////cut end

    }////order end
  })
  


</script>
</body>
</html>
